//
//  CCError.m
//  Activity
//
//  Created by coco on 15/5/8.
//  Copyright (c) 2015年 coco. All rights reserved.
//

#import "CCError.h"

@implementation CCError
- (id) initWithCode:(int)code des:(NSString *)des {
  if (self = [super init]) {
    _code = code;
    _des = des;
  }
  
  return self;
}

+ (id) errorWithCode:(int)code des:(NSString *)des {
  return [[self alloc] initWithCode:code des:des];
}

- (NSString *) description {
  return [NSString stringWithFormat:@"error code: %d description: %@", _code, _des];
}
@end
